<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-24 00:39:08
 * @lastTime 2020-05-01 23:00:21
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Design\Structural\Composite;

class TextElement implements Renderable
{

    private $text = '';


    public function __construct(string $text)
    {
        $this->text = $text;

    }//end __construct()


    public function render(): string
    {
        return sprintf('<p>%s</p>', $this->text);

    }//end render()


}//end class
